FIG. 1 depicts a conventional system 10 for performing a packet header lookup. A lookup corresponding to the packet header is performed in order to determine how the packet is to be treated. For example, based upon the information contained in the packet header, typically in the form of an IP five-tuple, the packet may be routed or processed differently. The conventional system 10 includes a network processor 12, a main store 14, a network adapter 16, and an adapter memory 18.
The packet is received in the network adapter 16 and provided to the adapter memory 18. The packet may then be copied to a temporary buffer (not explicitly shown) in the main store 14. Once the packet has been received and copied into the main store 14, the processor 12 then parses the packet to obtain the header. Based upon the header, the processor 12 performs a lookup. Typically, a hash of portions of the five-tuple in the header is used as a key to perform the lookup. Once the processor 12 receives the resultant of the lookup, the processor 12 processes the data using the resultant and copies the packet data to the destination buffer (not shown) in the main store 14.
Although the conventional system functions, one of ordinary skill in the art will readily recognize that it is relatively slow. In particular, the packet is completely received and stored in the main store 14 before the processor 12 commences operations on the packet related to performing the header lookup. Once the header is obtained, the main store 14 is searched in order to obtain the appropriate data. Each of these operations consumes time.
Accordingly, what is needed is a more efficient method and system for performing a packet header lookup. The present invention addresses such a need.